home *** CD-ROM | disk | FTP | other *** search
/ Nebula 2 / Nebula Two.iso / SourceCode / MiscKit1.7.1 / MiscKit / Headers / misckit / MiscAppExtensions.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-04-12  |  1.6 KB  |  57 lines

  1. //
  2. //    MiscAppExtensions.h -- a category to make extra information available
  3. //         via the application object.
  4. //        Written by Don Yacktman Copyright (c) 1993, 1994 by Don Yacktman.
  5. //                Version 1.3.  All rights reserved.
  6. //        This notice may not be removed from this source code.
  7. //
  8. //    This object is included in the MiscKit by permission from the author
  9. //    and its use is governed by the MiscKit license, found in the file
  10. //    "LICENSE.rtf" in the MiscKit distribution.  Please refer to that file
  11. //    for a list of all applicable permissions and restrictions.
  12. //    
  13.  
  14. #import <appkit/appkit.h>
  15.  
  16. int MiscOSVersion();    // returns a 0 or 1 (for 3.0 vs. 3.1) -1 on error
  17.  
  18. @interface Application(MiscAppExtensions)
  19.  
  20. - (const char *)appDirectory;
  21. - (int)osVersion;
  22. - (int)userIDNum;
  23. - (int)groupIDNum;
  24. - (int)effectiveUserIDNum;
  25. - (int)effectiveGroupIDNum;
  26. - (unsigned long int)hostID;
  27. - (NXAtom)userHomeDirectory;
  28. - (NXAtom)userLoginName;
  29. - (NXAtom)userRealName;
  30. - (NXAtom)realHostName;
  31. - (NXAtom)realNameFor:(NXAtom)userId;
  32. - (BOOL)groupMemberForID:(gid_t)anID;
  33. - (BOOL)groupMemberForString:(const char *)aString;
  34.  
  35. // The following four were donated by Thomas Engel <tomi@shinto.nbg.sub.org>
  36. - (NXAtom)domainName;
  37. - (NXAtom)realDomainName;
  38. - (BOOL)knowsDefaultValue:(const char *)defName;
  39. - (BOOL)didAutolaunch;
  40.  
  41. @end
  42.  
  43. @interface Window(MiscWindowExtensions)
  44.  
  45. - (BOOL)isMiniaturized;
  46.  
  47. @end
  48.  
  49. // This is for back compatability, but you ought to remove all references
  50. // to ExtendedApp from your code NOW!!!
  51. #define ExtendedApp Application
  52.  
  53. #ifndef DAYAPPCOMPAT_H
  54. #define DAYAPPCOMPAT_H
  55. #define DAYOSVersion MiscOSVersion
  56. #endif DAYAPPCOMPAT_H
  57.